<template>
  <el-form-item label="状态" style="margin-top:20px">
    <!-- 如果选择了全部,在发送请求的时候axios会自动忽略这个参数,不想后端传递 -->
    <el-radio-group v-model="status"
    @change="hChange"
    >
      <el-radio :label="null">全部</el-radio>
      <el-radio label="0">草稿</el-radio>
      <el-radio label="1">待审核</el-radio>
      <el-radio label="2">审核通过</el-radio>
      <el-radio label="3">审核失败</el-radio>
      <el-radio label="4">已删除</el-radio>
    </el-radio-group>
  </el-form-item>
</template>

<script>
export default {
  props: ['value'],
  data () {
    return {
      status: this.value // 父组件传递的数据,初始化
    }
  },
  methods: {
    hChange () {
      this.$emit('input', this.status)
      // console.log(this.status)  label
    }
  }
}
</script>

<style>

</style>
